home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / disk_utl / advapp / frmcreat.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-12-12  |  3.2 KB  |  109 lines

  1. VERSION 2.00
  2. Begin Form frmCreateDir 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Directory Commands"
  5.    ClientHeight    =   2190
  6.    ClientLeft      =   2895
  7.    ClientTop       =   1695
  8.    ClientWidth     =   5895
  9.    Height          =   2595
  10.    Left            =   2835
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   2190
  13.    ScaleWidth      =   5895
  14.    Top             =   1350
  15.    Width           =   6015
  16.    Begin TextBox txtPath 
  17.       Height          =   285
  18.       Index           =   1
  19.       Left            =   1680
  20.       TabIndex        =   3
  21.       Text            =   "Text1"
  22.       Top             =   1000
  23.       Width           =   3975
  24.    End
  25.    Begin CommandButton cmdOK 
  26.       Caption         =   "Delete Path:"
  27.       Height          =   375
  28.       Index           =   1
  29.       Left            =   120
  30.       TabIndex        =   1
  31.       Top             =   960
  32.       Width           =   1455
  33.    End
  34.    Begin CommandButton cmdOK 
  35.       Caption         =   "Create Path:"
  36.       Height          =   375
  37.       Index           =   0
  38.       Left            =   120
  39.       TabIndex        =   0
  40.       Top             =   240
  41.       Width           =   1455
  42.    End
  43.    Begin CommandButton cmdExit 
  44.       Caption         =   "&Exit"
  45.       Height          =   375
  46.       Left            =   2280
  47.       TabIndex        =   4
  48.       Top             =   1680
  49.       Width           =   1095
  50.    End
  51.    Begin TextBox txtPath 
  52.       Height          =   285
  53.       Index           =   0
  54.       Left            =   1680
  55.       TabIndex        =   2
  56.       Text            =   "Text1"
  57.       Top             =   280
  58.       Width           =   3975
  59.    End
  60.    Begin Line Line2 
  61.       X1              =   120
  62.       X2              =   5640
  63.       Y1              =   1560
  64.       Y2              =   1560
  65.    End
  66.    Begin Line Line1 
  67.       X1              =   120
  68.       X2              =   5640
  69.       Y1              =   840
  70.       Y2              =   840
  71.    End
  72. '''''''''''''''''''''''''''''''''''''''''''''''''
  73. ' Copyright by Advanced Applications 1994 - 1995
  74. ' All rights reserved
  75. '''''''''''''''''''''''''''''''''''''''''''''''''
  76. Sub cmdExit_Click ()
  77.     Me.Hide
  78. End Sub
  79. Sub cmdOK_Click (Value As Integer)
  80.     Screen.MousePointer = HOURGLASS
  81.     If txtPath(Value).Text = "" Then Exit Sub
  82.     strPath$ = txtPath(Value).Text
  83.     Select Case Value
  84.         Case 0
  85.             nReturn% = CreatePath(strPath$)
  86.             If nReturn% = FILE_EXISTS Then
  87.                 MsgBox "Directory was created"
  88.             Else
  89.                 Screen.MousePointer = DEFAULT
  90.                 DisplayError (nReturn%)
  91.             End If
  92.         Case 1
  93.             nReturn% = DeletePath(strPath$)
  94.             If nReturn% = FILE_EXISTS Then
  95.                 MsgBox "Directory was Deleted"
  96.             Else
  97.                 Screen.MousePointer = DEFAULT
  98.                 DisplayError (nReturn%)
  99.             End If
  100.     End Select
  101.     Screen.MousePointer = DEFAULT
  102. End Sub
  103. Sub Form_Load ()
  104.     Left = (Screen.Width - Width) / 2   ' Center form horizontally.
  105.     Top = (Screen.Height - Height) / 2  ' Center form vertically.
  106.     txtPath(0).Text = ""
  107.     txtPath(1).Text = ""
  108. End Sub
  109.